module Main where

import Prelude hiding (FilePath)
import System.Environment (getEnv)
import System.Console.CmdArgs                      
import System.Path
import System.Path.Directory
import System.Path.IO
 
-- | The supported version control systems.
data VCS = CVS | SVN | Darcs | HG | Git 
         deriving (Show)
                      
-- | Configuration type for vcsId
data Config = Config { directory :: FilePath }                      
              deriving (Show, Data, Typeable)
                       
-- | Default config.
-- The parameter is the current directory.
config :: FilePath -> Mode Config
config curDir = mode $ Config {
  directory = curDir &= text "The directory to check." 
              & typ "DIR" & explicit & flag "dir" & flag "d"
  }
         
main :: IO ()
main = do 
  curDir <- getEnv "PWD"
  conf <- cmdArgs "VCS ID v0.1, (C) Rogan Creswick 2009" [config curDir]
  vcs <- vcsId $ directory conf
  putStrLn vcs
  return 

-- | Identifies the version control system that manages the 
-- specified directory.
vcsId :: FilePath -> IO VCS
vcsId path = undefined


